import pdb
import random
import xlrd, pdb, json

indata = r'D:\00_code\007_papars\NER-joint\joint\Recurrent_Interaction_Network_update\Recurrent_Interaction_Network_EMNLP2020-master\tcm_data\symptom.json'

train_path = './tcm_data/train.json'
val_path = './tcm_data/test.json'

inlines = open(indata, 'r', encoding='utf8').readlines()
random.shuffle(inlines)

train_data = inlines[:750]
test_data = inlines[750:]




trainfile = open(train_path, 'w', encoding='utf8')
testfile = open(val_path, 'w', encoding='utf8')

trainfile.writelines(train_data)
testfile.writelines(test_data)













